package com.kangfawei.io;

import com.kangfawei.io.utils.FileUtils;

import java.io.*;

/**
 * @author 康发伟
 * 文件拷贝2
 */
public class FileCopy2 {

    public static void main(String[] args) {
        FileUtils util = new FileUtils();
        String src = "E:/IO_src/1.mp4";
        String target = "E:/IO_target/1.mp4";

        try( InputStream is = new FileInputStream(src);
             OutputStream os = new FileOutputStream(target);) {

            util.copy(is,os);

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
